// pages/strategydetails/strategydetails.js
const app = getApp()
var server = require('../../utils/server');
var WxParse = require('../../wxParse/wxParse.js');
var that
Page({

  /**
   * 页面的初始数据
   */
  data: {
    tu: app.globalData.tupian,
    list:[]
  },


  onLoad: function (e) {
    that =this
    server.requestForm(false, 'get', 'strategy', {
      filter:{
        _id: e.id
         }
    }, function (e) {
      console.log(e)
      if(e.code == 0){
        e.data[0].createTime = e.data[0].createTime.substr(0, 10);
        that.setData({
          list: e.data[0]
        })
        WxParse.wxParse('content', 'html', e.data[0].content, that, 5);
      }else{
        wx.showToast({
          title: e.message,
          icon: 'none',
          duration: 1000,
        });
      }

    })
  },

 
})